import React, {Component} from 'react'
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import axios from 'axios'
import * as echarts from 'echarts';


const mapStateToProps = (state) => ({
    idList:state.equipmentPage.idList,
    ImgData:state.equipmentPage.ImgData,
    optionData:state.equipmentPage.optionData,
  });
const mapDispatchToProps = (dispatch) => {
  return {
    getIdList:dispatch.equipmentPage.getIdList,
    showOneBackImg:dispatch.equipmentPage.showOneBackImg,
    getCurve:dispatch.equipmentPage.getCurve,
  }
};

class WthickLoss extends Component {

  componentDidMount() {
    const {getCurve,optionData,showOneBackImg} = this.props;
    // showOneBackImg();
    getCurve();
    // var myChart = echarts.init(document.getElementById('WthickLoss'));
    // const value = optionData.value;
    // console.log(optionData);
    // myChart.setOption({
    //     title:{ text:'壁厚损失'},
    //     tooltip:{},
    //     xAxis:{
    //       data:optionData.time
    //     },
    //     yAxis:{
    //       type: 'value'
    //     },
    //     series:[{
    //       data:value.lt,
    //       type:'line'
    //     }]
    // })
  }
  
  
  render() {
    return (
      <div id="WthickLoss">壁厚损失</div>
    );
  }
}


export default connect(
    mapStateToProps,
    mapDispatchToProps
)(withRouter(WthickLoss));
